import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import gradient

data = pd.read_csv('house.csv')
#print(list(data['GrLivArea']))
#data['YearBuilt']
data['w0'] = 1.0
# in_data = list(data['GrLivArea'])
in_data = pd.DataFrame([data['w0'], data['GrLivArea']])
tar_data = list(data['SalePrice'])
print(in_data.T)
w = gradient.liner_fit(in_data.T, tar_data)
plt.plot(in_data, tar_data, 'k+')
plt.plot(in_data, w[1]*in_data + w[0], 'k+')
plt.show()


